﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace AspNetMVCSourceTextDiffCompare.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            ViewBag.Title = "SourceDiff";

            return View();
        }

        public ActionResult About()
        {
            return View();
        }

        public ActionResult TextFileEditor(string id, string type, bool isIframe = false)
        {
            ViewBag.Layout = isIframe ? null : "~/Views/Shared/_Layout.cshtml";
            ViewBag.IsIframe = isIframe;
            ViewBag.FileType = type;
            ViewBag.FileId = id;
            return View((object)id);
        }

        public ActionResult TextFileEditor2(string id, string type, bool isIframe = false)
        {
            ViewBag.Layout = isIframe ? null : "~/Views/Shared/_Layout.cshtml";
            ViewBag.IsIframe = isIframe;
            ViewBag.FileType = type;
            ViewBag.FileId = id;
            return View((object)id);
        }

        public ActionResult TextFileEditorWithPdf(string id, string type, bool isIframe = false)
        {
            ViewBag.Layout = isIframe ? null : "~/Views/Shared/_Layout.cshtml";
            ViewBag.IsIframe = isIframe;
            ViewBag.FileType = type;
            ViewBag.FileId = id;
            return View((object)id);
        }
    }
}
